﻿@model IEnumerable<MobileSales.Model.Employees.Contract>

@{
    View.Title = Strings.Contracts;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@Strings.Contracts</h2>

<p>
    @Html.ActionLink(Strings.CreateNew, "Create", null, new { @class = "icon-button add-icon" })
</p>
<table class="datatable">
    <thead>
    <tr>
        <th style="width:190px"></th>
        <th>
            @ModelStrings.Name
        </th>
        <th>
            @ModelStrings.Description
        </th>
        <th>
            @ModelStrings.PricePerHour
        </th>
        <th>
            @ModelStrings.HourPerDay
        </th>
    </tr>
    </thead>
    <tbody>
@if (Model != null)
{
    foreach (var item in Model)
    {
    <tr>
        <td>
            @Html.ActionLink(Strings.Edit, "Edit", new { id = item.Id }, new { @class = "icon-button edit-icon" }) |
            @Html.ActionLink(Strings.Details, "Details", new { id = item.Id }, new { @class = "icon-button details-icon" })<br /><br />
            @Html.ActionLink(Strings.Delete, "Delete", new { id = item.Id }, new { @class = "icon-button delete-icon" })
        </td>
        <td>
            @item.Name
        </td>
        <td>
            @item.Description
        </td>
        <td>
            @String.Format("{0:F}", item.PricePerHour)
        </td>
        <td>
            @item.HourPerDay
        </td>
    </tr>
    }
}
</tbody>
</table>

